package luweiteng.demoForLogin.config;

import luweiteng.demoForLogin.shiro.realm.ConsumerRealm;
import org.apache.shiro.mgt.SecurityManager;
import org.apache.shiro.mgt.SessionsSecurityManager;
import org.apache.shiro.session.mgt.SessionManager;
import org.apache.shiro.session.mgt.eis.EnterpriseCacheSessionDAO;
import org.apache.shiro.web.mgt.DefaultWebSecurityManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class ShiroConfig {

//    @Bean
//    public SecurityManager getSecurityManager(ConsumerRealm realm) {
//        DefaultWebSecurityManager manager =new DefaultWebSecurityManager();
//        manager.setRealm(realm);
//        return manager;
//    }
//    No SecurityManager accessible to the calling code,
//    either bound to the org.apache.shiro.util.ThreadContext or as a vm static singleton.

}
